Imports System
Imports System.Data
Imports System.Data.Common
Imports System.Collections.Generic
Imports ACFramework

Partial Public Class ETRAN_VehiculosNeumaticos

#Region " Campos "
	
	Private m_vneum_id as Long
	Private m_vehic_id as Long
	Private m_neuma_id as Long
	Private m_ramfl_id as Long
	Private m_vneum_fecasignacion as Date
	Private m_vneum_fecretiro as Date
	Private m_vneum_lado as String
	Private m_vneum_seccion as String
	Private m_vneum_ordenposicion as Short
	Private m_vneum_internoexterno as String
	Private m_vneum_repuesto as Short
	Private m_vneum_estado as String
	Private m_vneum_kminicio as Decimal
	Private m_vneum_kmfin as Decimal
	Private m_vneum_usrcrea as String
	Private m_vneum_feccrea as Date
	Private m_vneum_usrmod as String
	Private m_vneum_fecmod as Date
	Private m_nuevo as Boolean
	Private m_modificado as Boolean
	Private m_eliminado as Boolean
#End Region

#Region" Constructores "
	
	Public Sub New()

	End Sub

#End Region

#Region" Propiedades "
	
	Public Property VNEUM_ID() as Long
		Get
			return m_vneum_id
		End Get
		Set(ByVal value As Long)
			If Not IsNothing(m_vneum_id) Then
				If Not m_vneum_id.Equals(value) Then
					m_vneum_id = value
					OnVNEUM_IDChanged(m_vneum_id, EventArgs.Empty)
				End If
			Else
				m_vneum_id = value
				OnVNEUM_IDChanged(m_vneum_id, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VEHIC_ID() as Long
		Get
			return m_vehic_id
		End Get
		Set(ByVal value As Long)
			If Not IsNothing(m_vehic_id) Then
				If Not m_vehic_id.Equals(value) Then
					m_vehic_id = value
					OnVEHIC_IDChanged(m_vehic_id, EventArgs.Empty)
				End If
			Else
				m_vehic_id = value
				OnVEHIC_IDChanged(m_vehic_id, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property NEUMA_ID() as Long
		Get
			return m_neuma_id
		End Get
		Set(ByVal value As Long)
			If Not IsNothing(m_neuma_id) Then
				If Not m_neuma_id.Equals(value) Then
					m_neuma_id = value
					OnNEUMA_IDChanged(m_neuma_id, EventArgs.Empty)
				End If
			Else
				m_neuma_id = value
				OnNEUMA_IDChanged(m_neuma_id, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property RAMFL_ID() as Long
		Get
			return m_ramfl_id
		End Get
		Set(ByVal value As Long)
			If Not IsNothing(m_ramfl_id) Then
				If Not m_ramfl_id.Equals(value) Then
					m_ramfl_id = value
					OnRAMFL_IDChanged(m_ramfl_id, EventArgs.Empty)
				End If
			Else
				m_ramfl_id = value
				OnRAMFL_IDChanged(m_ramfl_id, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_FECASIGNACION() as Date
		Get
			return m_vneum_fecasignacion
		End Get
		Set(ByVal value As Date)
			If Not IsNothing(m_vneum_fecasignacion) Then
				If Not m_vneum_fecasignacion.Equals(value) Then
					m_vneum_fecasignacion = value
					OnVNEUM_FECASIGNACIONChanged(m_vneum_fecasignacion, EventArgs.Empty)
				End If
			Else
				m_vneum_fecasignacion = value
				OnVNEUM_FECASIGNACIONChanged(m_vneum_fecasignacion, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_FECRETIRO() as Date
		Get
			return m_vneum_fecretiro
		End Get
		Set(ByVal value As Date)
			If Not IsNothing(m_vneum_fecretiro) Then
				If Not m_vneum_fecretiro.Equals(value) Then
					m_vneum_fecretiro = value
					OnVNEUM_FECRETIROChanged(m_vneum_fecretiro, EventArgs.Empty)
				End If
			Else
				m_vneum_fecretiro = value
				OnVNEUM_FECRETIROChanged(m_vneum_fecretiro, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_LADO() as String
		Get
			return m_vneum_lado
		End Get
		Set(ByVal value As String)
			If Not IsNothing(m_vneum_lado) Then
				If Not m_vneum_lado.Equals(value) Then
					m_vneum_lado = value
					OnVNEUM_LADOChanged(m_vneum_lado, EventArgs.Empty)
				End If
			Else
				m_vneum_lado = value
				OnVNEUM_LADOChanged(m_vneum_lado, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_SECCION() as String
		Get
			return m_vneum_seccion
		End Get
		Set(ByVal value As String)
			If Not IsNothing(m_vneum_seccion) Then
				If Not m_vneum_seccion.Equals(value) Then
					m_vneum_seccion = value
					OnVNEUM_SECCIONChanged(m_vneum_seccion, EventArgs.Empty)
				End If
			Else
				m_vneum_seccion = value
				OnVNEUM_SECCIONChanged(m_vneum_seccion, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_ORDENPOSICION() as Short
		Get
			return m_vneum_ordenposicion
		End Get
		Set(ByVal value As Short)
			If Not IsNothing(m_vneum_ordenposicion) Then
				If Not m_vneum_ordenposicion.Equals(value) Then
					m_vneum_ordenposicion = value
					OnVNEUM_ORDENPOSICIONChanged(m_vneum_ordenposicion, EventArgs.Empty)
				End If
			Else
				m_vneum_ordenposicion = value
				OnVNEUM_ORDENPOSICIONChanged(m_vneum_ordenposicion, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_INTERNOEXTERNO() as String
		Get
			return m_vneum_internoexterno
		End Get
		Set(ByVal value As String)
			If Not IsNothing(m_vneum_internoexterno) Then
				If Not m_vneum_internoexterno.Equals(value) Then
					m_vneum_internoexterno = value
					OnVNEUM_INTERNOEXTERNOChanged(m_vneum_internoexterno, EventArgs.Empty)
				End If
			Else
				m_vneum_internoexterno = value
				OnVNEUM_INTERNOEXTERNOChanged(m_vneum_internoexterno, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_REPUESTO() as Short
		Get
			return m_vneum_repuesto
		End Get
		Set(ByVal value As Short)
			If Not IsNothing(m_vneum_repuesto) Then
				If Not m_vneum_repuesto.Equals(value) Then
					m_vneum_repuesto = value
					OnVNEUM_REPUESTOChanged(m_vneum_repuesto, EventArgs.Empty)
				End If
			Else
				m_vneum_repuesto = value
				OnVNEUM_REPUESTOChanged(m_vneum_repuesto, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_ESTADO() as String
		Get
			return m_vneum_estado
		End Get
		Set(ByVal value As String)
			If Not IsNothing(m_vneum_estado) Then
				If Not m_vneum_estado.Equals(value) Then
					m_vneum_estado = value
					OnVNEUM_ESTADOChanged(m_vneum_estado, EventArgs.Empty)
				End If
			Else
				m_vneum_estado = value
				OnVNEUM_ESTADOChanged(m_vneum_estado, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_KMINICIO() as Decimal
		Get
			return m_vneum_kminicio
		End Get
		Set(ByVal value As Decimal)
			If Not IsNothing(m_vneum_kminicio) Then
				If Not m_vneum_kminicio.Equals(value) Then
					m_vneum_kminicio = value
					OnVNEUM_KMINICIOChanged(m_vneum_kminicio, EventArgs.Empty)
				End If
			Else
				m_vneum_kminicio = value
				OnVNEUM_KMINICIOChanged(m_vneum_kminicio, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_KMFIN() as Decimal
		Get
			return m_vneum_kmfin
		End Get
		Set(ByVal value As Decimal)
			If Not IsNothing(m_vneum_kmfin) Then
				If Not m_vneum_kmfin.Equals(value) Then
					m_vneum_kmfin = value
					OnVNEUM_KMFINChanged(m_vneum_kmfin, EventArgs.Empty)
				End If
			Else
				m_vneum_kmfin = value
				OnVNEUM_KMFINChanged(m_vneum_kmfin, EventArgs.Empty)
			End If
		End Set
	End Property
	Public Property VNEUM_UsrCrea() as String
		Get
			return m_vneum_usrcrea
		End Get
		Set(ByVal value As String)
			m_vneum_usrcrea = value
		End Set
	End Property
	Public Property VNEUM_FecCrea() as Date
		Get
			return m_vneum_feccrea
		End Get
		Set(ByVal value As Date)
			m_vneum_feccrea = value
		End Set
	End Property
	Public Property VNEUM_UsrMod() as String
		Get
			return m_vneum_usrmod
		End Get
		Set(ByVal value As String)
			m_vneum_usrmod = value
		End Set
	End Property
	Public Property VNEUM_FecMod() as Date
		Get
			return m_vneum_fecmod
		End Get
		Set(ByVal value As Date)
			m_vneum_fecmod = value
		End Set
	End Property
	Public ReadOnly Property Nuevo() as Boolean
		Get
			return m_nuevo
		End Get
	End Property
	Public ReadOnly Property Modificado() as Boolean
		Get
			return m_modificado
		End Get
	End Property
	Public ReadOnly Property Eliminado() as Boolean
		Get
			return m_eliminado
		End Get
	End Property

#End Region

#Region " Eventos "
	
	Public Event VNEUM_IDChanged as EventHandler
	Public Event VEHIC_IDChanged as EventHandler
	Public Event NEUMA_IDChanged as EventHandler
	Public Event RAMFL_IDChanged as EventHandler
	Public Event VNEUM_FECASIGNACIONChanged as EventHandler
	Public Event VNEUM_FECRETIROChanged as EventHandler
	Public Event VNEUM_LADOChanged as EventHandler
	Public Event VNEUM_SECCIONChanged as EventHandler
	Public Event VNEUM_ORDENPOSICIONChanged as EventHandler
	Public Event VNEUM_INTERNOEXTERNOChanged as EventHandler
	Public Event VNEUM_REPUESTOChanged as EventHandler
	Public Event VNEUM_ESTADOChanged as EventHandler
	Public Event VNEUM_KMINICIOChanged as EventHandler
	Public Event VNEUM_KMFINChanged as EventHandler
	Public Sub OnVNEUM_IDChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_IDChanged(sender, e)
	End Sub
	Public Sub OnVEHIC_IDChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VEHIC_IDChanged(sender, e)
	End Sub
	Public Sub OnNEUMA_IDChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent NEUMA_IDChanged(sender, e)
	End Sub
	Public Sub OnRAMFL_IDChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent RAMFL_IDChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_FECASIGNACIONChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_FECASIGNACIONChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_FECRETIROChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_FECRETIROChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_LADOChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_LADOChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_SECCIONChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_SECCIONChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_ORDENPOSICIONChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_ORDENPOSICIONChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_INTERNOEXTERNOChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_INTERNOEXTERNOChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_REPUESTOChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_REPUESTOChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_ESTADOChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_ESTADOChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_KMINICIOChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_KMINICIOChanged(sender, e)
	End Sub
	Public Sub OnVNEUM_KMFINChanged(ByVal sender as object, ByVal e As EventArgs)
		ActualizarInstancia()
		RaiseEvent VNEUM_KMFINChanged(sender, e)
	End Sub

#End Region

#Region " Metodos "
	
	Public Sub Instanciar(ByVal x_instancia As ACEInstancia)
		Select Case x_instancia
			Case ACEInstancia.Consulta
				m_nuevo = False
				m_modificado = False
				m_eliminado = False
			Case ACEInstancia.Nuevo
				m_nuevo = True
				m_modificado = False
				m_eliminado = False
			Case ACEInstancia.Modificado
				m_nuevo = False
				m_modificado = True
				m_eliminado = False
			Case ACEInstancia.Eliminado
				m_nuevo = False
				m_modificado = False
				m_eliminado = True
		End Select
	End Sub
	Public Sub ActualizarInstancia()
		If Not Nuevo Then
			If Not Eliminado Then
				Instanciar(ACEInstancia.Modificado)
			End If
		End If
	End Sub

#End Region

End Class

